package com.zb.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zb.entity.ZjNetworkEmpRelation;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * 网点人员关联表 Mapper 接口
 * </p>
 *
 * @author WEN
 * @since 2023-10-18
 */
@Repository
public interface ZjNetworkEmpRelationMapper extends BaseMapper<ZjNetworkEmpRelation> {

    /**
     * 根据网点ID & 网点人员ID查询
     * @param networkId 网点ID
     * @param networkEmpId 网点人员ID
     * @return
     */
    ZjNetworkEmpRelation getByNetworkIdAndNetworkEmpId(@Param("networkId") Long networkId, @Param("networkEmpId") Long networkEmpId);

    /**
     * 根据[服务商ID]&[服务商人员ID]获取服务商负责人
     * @param networkId 服务商ID
     * @param networkEmpId 服务商人员ID
     * @return
     */
    Long getManagerByNetworkIdAndNetworkEmpId(@Param("networkId") Long networkId, @Param("networkEmpId") Long networkEmpId);

    /**
     * 根据[服务商ID]获取服务商负责人
     * @param networkId 服务商ID
     * @return
     */
    Long getManagerByNetworkId(@Param("networkId") Long networkId);
}
